package com.test

import com.main
import com.utils.ZipUtils
import java.io.File
import kotlin.test.Test

class PackTest {

    @Test
    fun test() {
        var args = arrayOf("-help")
//                args = arrayOf("-cls","staging", "D:\\WorkSpace\\LayaBox\\CoinPusher\\pack\\script_pack_demo.kts")
//                args = arrayOf("-cls","release", "D:\\WorkSpace\\LayaBox\\CoinPusher\\pack\\script_pack_demo.kts")
        args = arrayOf("-cls", "staging", "D:\\WorkSpace\\LayaBox\\GameMapro\\pack\\script_pack_demo.kts")

//        args = arrayOf("staging", "E:\\WorkSpace\\LayaBox\\GameMania\\script_packGame.lua")
//        args = arrayOf("-cls", "debug", "./data/script/script_packDemo.lua")
//        args = arrayOf("-cls", "-zip", "debug", "./data/script/script_packDemo.lua")
//        args = arrayOf("-cls", "staging", "./data/script/script_packDemo.lua")
        main(args)

    }

    @Test
    fun demoTest() {
        val args = arrayOf("-cls", "staging", "./data/script_pack_demo.kts")
        main(args)
    }

    @Test
    fun testLanguages() {
        var args = arrayOf("-lang", "./data/script/languages.lua", "-toXls")
        args = arrayOf("-lang", "./data/script/languages.lua", "-toXml")
        args = arrayOf("-lang", "./data/script/languages.lua", "-toXml", "-toXmlCol", "3")

        args = arrayOf("-lang", "D:/WorkSpace/Idea/TypeScript/CrashGames/KickersX/config/lang.yml", "-toXls")
        args = arrayOf("-lang", "D:/WorkSpace/Idea/TypeScript/CrashGames/KickersX/config/lang.yml", "-toXml")
        main(args)
    }

    @Test
    fun zip() {
        val fileStr = "C:\\Users\\Administrator\\demoBucketName"
        try {
            ZipUtils.zip(
                File("E:\\Project\\packTest\\outFile", "test.zip").absolutePath,
                "test",
                fileStr
            )
        } catch (e: Exception) {
            e.printStackTrace()
        }
    }

    @Test
    fun xmlToTSTest() {

        val args = arrayOf("-toTs", "-lang", "./config/lang.yml")
        main(args)

    }


}
